<template>
  <div class="home-wrap">
    <el-container style="border: 1px solid #45BE93">
      <el-aside width="200px" style="background-color:#45BE93">
        <el-menu router :default-active="$route.path">
          <el-submenu index="1">
            <template slot="title"><i class="el-icon-message"></i>商品管理</template>
            <el-menu-item-group>
              <el-menu-item index="/goodsClassify">商品分类</el-menu-item>
              <el-menu-item index="/classifyList">分类列表</el-menu-item>
              <el-menu-item index="/addGoods">商品上架</el-menu-item>
              <el-menu-item index="/goodsList">商品列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title"><i class="el-icon-menu"></i>小程序管理</template>
            <el-menu-item-group>
              <el-menu-item index="/addSwipeImg">新增轮播图</el-menu-item>
              <el-menu-item index="/swipeImgList">轮播图列表</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title"><i class="el-icon-setting"></i>导航三</template>
            <el-menu-item-group>
              <el-menu-item index="3-1">选项1</el-menu-item>
              <el-menu-item index="3-2">选项2</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      
      <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <el-dropdown>
            <i class="el-icon-setting" style="margin-right: 15px"></i>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>查看</el-dropdown-item>
              <el-dropdown-item>新增</el-dropdown-item>
              <el-dropdown-item>删除</el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <span>Hello ~洋洋</span>
        </el-header>
        <!-- 中间展示部分 -->
        <el-main>
          <router-view :key="$route.path"></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
    name: 'home'
}
</script>

<style lang="less" scoped>
@fontColor: #FAF6EE;
  .home-wrap {
    width: 100%;
    height: 100%;
    .el-container {
      height: 100%;
    }
    /deep/.el-header {
      background-color: #45BE93;
      color: #000 ;
      line-height: 60px;
    }
    /deep/.el-aside {
      color: @fontColor;
      background-color: #45BE93!important;
      .el-menu {
        color: @fontColor;
        background-color: #45BE93;
        .el-submenu__title, .el-menu-item, .el-submenu__title i {
          color: @fontColor;
          &:hover {
            background-color: #FFD662;
          }
        }
        .el-menu-item.is-active {
          background-color: #FFD662;
        }
      }
    }
  }
</style>